#pragma once


#include <StructIdentification.h>
#include <StructMedia.h>


class CMediaColllection
{
public:
	CMediaColllection(void);
	~CMediaColllection(void);
private:
	WSysConfigString inifile;
    WSysConfigString OutputMedia;
    WSysConfigString ReadyStatus;
    WSysConfigString RecordPath;
    WSysConfigString RecordType;
    WSysConfigString LogRecord;
	
	MediaStruct m_mediadata;
	std::vector<IdentificationStruct*> m_identlist;

	HANDLE  m_hCollecton;


	HANDLE m_hOutputFile;
	HANDLE m_hOutputMapping;
	HANDLE m_hReadyFile;
	HANDLE m_hReadyMapping;

	bool	m_threadstart;
	IplImage* pFrameCur;

public:
	int InitConfig(void);
	// StartCollection
	int StartCollection(void);
	// StopCollection
	int StopCollection(void);
private:
	// LoadMediaDll
	int LoadMediaDll(CReadConfig * readcfg);
	// LoadIdentificationDll
	int LoadIdentificationDll(CReadConfig * readcfg);
public:
	// CheckThreadStatus
	bool CheckThreadStatus(void);
	// ColllectionMediaData
	void ColllectionMediaData(void);
	// CheckIdentification
	bool CheckIdentification(void);
};

